
with open('my_diary.txt','a',encoding='utf-8') as f:
    f.write("2023-10-01")
    f.write("晴\n")
    f.write("今天学习了Python的文件操作!\n")
print("日记写入完成")
